//
//  ShareItemButton.m
//  Btpin
//
//  Created by Vic on 2019/4/27.
//  Copyright © 2019 Vic. All rights reserved.
//

#import "ShareItemButton.h"

@implementation ShareItemButton

- (instancetype)initWithFrame:(CGRect)frame imageName:(NSString *)imageName itemText:(NSString *)itemText {
    self = [super initWithFrame:frame];
    if (self) {
        [self initUIImageName:imageName itemText:itemText];
    }
    return self;
}
- (void)initUIImageName:(NSString *)imageName itemText:(NSString *)itemText {
    UIImageView *imgView = [UIToolsControl initImageViewWithFrame:CGRectMake((self.frame.size.width-52*Scale)*0.5, 20*Scale, 52*Scale, 52*Scale) imageName:imageName];
    imgView.userInteractionEnabled = NO;
    imgView.layer.cornerRadius = 26*Scale;
    imgView.layer.masksToBounds = YES;
    [self addSubview:imgView];
    
    UILabel *lbl = [UIToolsControl initLabelWithFrame:CGRectMake(0, EndY(imgView), self.frame.size.width, 45*Scale) text:itemText textColor:THEMECOLOR_OF_TEXT_9a9a9a font:Font_15];
    lbl.textAlignment = NSTextAlignmentCenter;
    [self addSubview:lbl];
}

@end
